package extensions.packet;

import java.io.IOException;

import extensions.romario.packet.Packets;

public class MessagePacket extends ServerPacket {

	private String _msg;
	public MessagePacket(String msg) {
		super(Packets.PACKET_MESSAGE);
		_msg = msg;
	}

	@Override
	public void readContent() throws IOException {
		_msg = readString();
	}

	@Override
	public void writeContent() throws IOException {
		writeString(_msg);
	}

	@Override
	public void runContent() {
		System.out.println(_msg);
	}

}
